home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI MineSet 2.5
/
SGI MineSet 2.5.iso
/
movies
/
playmovies
< prev
next >
Wrap
Text File
|
1998-05-12
|
2KB
|
77 lines
#!/bin/ksh
##################################################################################
# ** Copyright 1991-1998, Silicon Graphics, Inc. #
# ** All Rights Reserved. #
# ** #
# ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.; #
# ** the contents of this file may not be disclosed to third parties, copied or #
# ** duplicated in any form, in whole or in part, without the prior written #
# ** permission of Silicon Graphics, Inc. #
##################################################################################
MOVIEPLAYER="movieplayer"
STOREDIR="/usr/lib/MineSet/demos/movies"
USAGE="$0 [-l(oop) | <file>.mov | -help ] (# of times)"
if [[ ! -f ./movieplayer ]]
then
print "\n\007$MOVIEPLAYER not found. Please run the following command"
print "cp $STOREDIR/movieplayer .\n"
exit 3
fi
if (($# == 0 || $# > 3))
then
print $USAGE
exit 3
fi
exec 2>/dev/null
case $1 in
-h*) print "$0 \n"
print " -help : print this message"
print " -l : play the movies continiously"
print " <file>.mov : play the specified movie\n\n"
print " you can give the script a number value as the second argument"
print " where the # tells the script to loop that # number of times\n"
print " For example: \n\t\t $0 -c 3 \n\n will play all the movies 3 times in a row \n"
exit 3;;
-l*) if [[ $2 = "" ]]
then
for movie in `ls -1 *mov`
do
$MOVIEPLAYER -nofork -l 1 $movie
done
else
num=0
while (($num < $2))
do
((num = num + 1))
for movie in `ls -1 *mov`
do
$MOVIEPLAYER -nofork -l 1 $movie
done
done
fi;;
*mov) if [[ $2 = "" ]]
then
$MOVIEPLAYER -nofork -l 1 $1
else
$MOVIEPLAYER -nofork -l $2 $1
fi;;
*) print $USAGE
exit 3;;
esac